import Vue from 'vue'
import Router from 'vue-router'
// 导入Layout的页面组件
import Layout from '@/components/Layout.vue'
import consumer_list from '@/consumer/list.vue'
import singer_list from '@/singer/list.vue'
import song_list from '@/song/list.vue'


Vue.use(Router)

// 构建路由对象
export default new Router({
  // 规则
  routes: [
    {
      path: '/', //地址
      name: 'Layout',
      component: Layout, //页面组件
      children: [  //相对Layout子路由
        {
          path: '/consumer_list', //地址
          name: 'consumer_list',
          component: consumer_list //页面组件
        },
        {
          path: '/singer_list', //地址
          name: 'singer_list',
          component: singer_list //页面组件
        },
        {
          path: '/song_list', //地址
          name: 'song_list',
          component: song_list //页面组件
        },
      ]
    },

  ]
})
